<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:forgeview="http://jboss.org/forge/view"	
	template="/resources/scaffold/pageTemplate.xhtml">

	<f:metadata>
		<f:viewParam name="id" value="#{mmLocationBean.id}"/>
		<f:event type="preRenderView" listener="#{mmLocationBean.retrieve}"/>
	</f:metadata>

	<ui:param name="pageTitle" value="Create Mm Location"/>

	<ui:define name="header">
		Mm Location
	</ui:define>

	<ui:define name="subheader">
		<c:choose>
			<c:when test="#{!empty mmLocationBean.id}">
				Edit existing Mm Location
			</c:when>
			<c:otherwise>
				Create a new Mm Location
			</c:otherwise>
		</c:choose>
	</ui:define>

	<ui:define name="footer"/>

	<ui:define name="main">
		<h:form id="create">
			<h:messages globalOnly="true" styleClass="error"/>

			<h:panelGrid columnClasses="label,component,required" columns="3">
				<h:outputLabel for="mmLocationBeanMmLocationLctNo" value="Lct No:"/>
				<h:panelGroup>
					<h:inputText id="mmLocationBeanMmLocationLctNo" required="true" value="#{mmLocationBean.mmLocation.lctNo}"/>
					<h:message for="mmLocationBeanMmLocationLctNo" styleClass="error"/>
				</h:panelGroup>
				<h:outputText value="*"/>
				<h:outputLabel for="mmLocationBeanMmLocationSysUomByLctDimUomNo" value="Sys Uom By Lct Dim Uom No:"/>
				<h:panelGroup>
					<h:selectOneMenu converter="#{sysUomBean.converter}" id="mmLocationBeanMmLocationSysUomByLctDimUomNo" value="#{mmLocationBean.mmLocation.sysUomByLctDimUomNo}">
						<f:selectItem/>
						<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{sysUomBean.all}" var="_item"/>
					</h:selectOneMenu>
					<h:message for="mmLocationBeanMmLocationSysUomByLctDimUomNo" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="mmLocationBeanMmLocationSysUomByLctAreaSizeUomNo" value="Sys Uom By Lct Area Size Uom No:"/>
				<h:panelGroup>
					<h:selectOneMenu converter="#{sysUomBean.converter}" id="mmLocationBeanMmLocationSysUomByLctAreaSizeUomNo" value="#{mmLocationBean.mmLocation.sysUomByLctAreaSizeUomNo}">
						<f:selectItem/>
						<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{sysUomBean.all}" var="_item"/>
					</h:selectOneMenu>
					<h:message for="mmLocationBeanMmLocationSysUomByLctAreaSizeUomNo" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="mmLocationBeanMmLocationMmLocationLevel" value="Mm Location Level:"/>
				<h:panelGroup>
					<h:selectOneMenu converter="#{mmLocationLevelBean.converter}" id="mmLocationBeanMmLocationMmLocationLevel" value="#{mmLocationBean.mmLocation.mmLocationLevel}">
						<f:selectItem/>
						<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{mmLocationLevelBean.all}" var="_item"/>
					</h:selectOneMenu>
					<h:message for="mmLocationBeanMmLocationMmLocationLevel" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="mmLocationBeanMmLocationLctLevelTypeNo" value="Lct Level Type No:"/>
				<h:panelGroup>
					<h:inputText id="mmLocationBeanMmLocationLctLevelTypeNo" value="#{mmLocationBean.mmLocation.lctLevelTypeNo}"/>
					<h:message for="mmLocationBeanMmLocationLctLevelTypeNo" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="mmLocationBeanMmLocationLctCode" value="Lct Code:"/>
				<h:panelGroup>
					<h:inputText id="mmLocationBeanMmLocationLctCode" maxLength="50" value="#{mmLocationBean.mmLocation.lctCode}"/>
					<h:message for="mmLocationBeanMmLocationLctCode" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="mmLocationBeanMmLocationLctSeqNo" value="Lct Seq No:"/>
				<h:panelGroup>
					<h:inputText id="mmLocationBeanMmLocationLctSeqNo" required="true" value="#{mmLocationBean.mmLocation.lctSeqNo}"/>
					<h:message for="mmLocationBeanMmLocationLctSeqNo" styleClass="error"/>
				</h:panelGroup>
				<h:outputText value="*"/>
				<h:outputLabel for="mmLocationBeanMmLocationLctDescr" value="Lct Descr:"/>
				<h:panelGroup>
					<h:inputText id="mmLocationBeanMmLocationLctDescr" maxLength="300" value="#{mmLocationBean.mmLocation.lctDescr}"/>
					<h:message for="mmLocationBeanMmLocationLctDescr" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="mmLocationBeanMmLocationLctAreaSize" value="Lct Area Size:"/>
				<h:panelGroup>
					<h:inputText id="mmLocationBeanMmLocationLctAreaSize" required="true" value="#{mmLocationBean.mmLocation.lctAreaSize}"/>
					<h:message for="mmLocationBeanMmLocationLctAreaSize" styleClass="error"/>
				</h:panelGroup>
				<h:outputText value="*"/>
				<h:outputLabel for="mmLocationBeanMmLocationLctWidth" value="Lct Width:"/>
				<h:panelGroup>
					<h:inputText id="mmLocationBeanMmLocationLctWidth" required="true" value="#{mmLocationBean.mmLocation.lctWidth}"/>
					<h:message for="mmLocationBeanMmLocationLctWidth" styleClass="error"/>
				</h:panelGroup>
				<h:outputText value="*"/>
				<h:outputLabel for="mmLocationBeanMmLocationLctLength" value="Lct Length:"/>
				<h:panelGroup>
					<h:inputText id="mmLocationBeanMmLocationLctLength" required="true" value="#{mmLocationBean.mmLocation.lctLength}"/>
					<h:message for="mmLocationBeanMmLocationLctLength" styleClass="error"/>
				</h:panelGroup>
				<h:outputText value="*"/>
				<h:outputLabel for="mmLocationBeanMmLocationLctHeight" value="Lct Height:"/>
				<h:panelGroup>
					<h:inputText id="mmLocationBeanMmLocationLctHeight" required="true" value="#{mmLocationBean.mmLocation.lctHeight}"/>
					<h:message for="mmLocationBeanMmLocationLctHeight" styleClass="error"/>
				</h:panelGroup>
				<h:outputText value="*"/>
				<h:outputLabel for="mmLocationBeanMmLocationLctEffectiveDate" value="Lct Effective Date:"/>
				<h:panelGroup>
					<h:inputText id="mmLocationBeanMmLocationLctEffectiveDate" maxLength="10" value="#{mmLocationBean.mmLocation.lctEffectiveDate}">
						<f:convertDateTime type="date"/>
					</h:inputText>
					<h:message for="mmLocationBeanMmLocationLctEffectiveDate" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="mmLocationBeanMmLocationLctExpireDate" value="Lct Expire Date:"/>
				<h:panelGroup>
					<h:inputText id="mmLocationBeanMmLocationLctExpireDate" maxLength="10" value="#{mmLocationBean.mmLocation.lctExpireDate}">
						<f:convertDateTime type="date"/>
					</h:inputText>
					<h:message for="mmLocationBeanMmLocationLctExpireDate" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="mmLocationBeanMmLocationLctStatusNo" value="Lct Status No:"/>
				<h:panelGroup>
					<h:inputText id="mmLocationBeanMmLocationLctStatusNo" value="#{mmLocationBean.mmLocation.lctStatusNo}"/>
					<h:message for="mmLocationBeanMmLocationLctStatusNo" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="mmLocationBeanMmLocationMmLocationSubsForSubLctNo" value="Mm Location Subs For Sub Lct No:"/>
				<h:panelGroup>
					<ui:param name="_collection" value="#{mmLocationBean.mmLocation.mmLocationSubsForSubLctNo}"/>
					<h:dataTable id="mmLocationBeanMmLocationMmLocationSubsForSubLctNo" styleClass="data-table" value="#{forgeview:asList(_collection)}" var="_item">
						<h:column>
							<f:facet name="header">
								<h:outputText value="Mm Location By Lct No"/>
							</f:facet>
							<h:link outcome="/mmLocationSub/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="forgeviewdisplayitemMmLocationByLctNo" value="#{forgeview:display(_item.mmLocationByLctNo)}"/>
							</h:link>
							<f:facet name="footer">
								<h:selectOneMenu converter="#{mmLocationBean.converter}" id="mmLocationSubBeanAddMmLocationByLctNo" value="#{mmLocationSubBean.add.mmLocationByLctNo}">
									<f:selectItem/>
									<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{mmLocationBean.all}" var="_item"/>
								</h:selectOneMenu>
								<h:message for="mmLocationSubBeanAddMmLocationByLctNo" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Sub Lct Descr"/>
							</f:facet>
							<h:link outcome="/mmLocationSub/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="itemSubLctDescr" value="#{_item.subLctDescr}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="mmLocationSubBeanAddSubLctDescr" maxLength="300" value="#{mmLocationSubBean.add.subLctDescr}"/>
								<h:message for="mmLocationSubBeanAddSubLctDescr" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column footerClass="remove-column" headerClass="remove-column">
							<h:commandLink action="#{_collection.remove(_item)}" styleClass="remove-button"/>
							<f:facet name="footer">
								<h:commandLink action="#{_collection.add(mmLocationSubBean.added)}" id="mmLocationBeanMmLocationMmLocationSubsForSubLctNoAdd" styleClass="add-button">
									<f:setPropertyActionListener target="#{mmLocationSubBean.add.mmLocationBySubLctNo}" value="#{mmLocationBean.mmLocation}"/>
								</h:commandLink>
							</f:facet>
						</h:column>
					</h:dataTable>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="mmLocationBeanMmLocationMmLocationSubsForLctNo" value="Mm Location Subs For Lct No:"/>
				<h:panelGroup>
					<ui:param name="_collection" value="#{mmLocationBean.mmLocation.mmLocationSubsForLctNo}"/>
					<h:dataTable id="mmLocationBeanMmLocationMmLocationSubsForLctNo" styleClass="data-table" value="#{forgeview:asList(_collection)}" var="_item">
						<h:column>
							<f:facet name="header">
								<h:outputText value="Mm Location By Sub Lct No"/>
							</f:facet>
							<h:link outcome="/mmLocationSub/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="forgeviewdisplayitemMmLocationBySubLctNo" value="#{forgeview:display(_item.mmLocationBySubLctNo)}"/>
							</h:link>
							<f:facet name="footer">
								<h:selectOneMenu converter="#{mmLocationBean.converter}" id="mmLocationSubBeanAddMmLocationBySubLctNo" value="#{mmLocationSubBean.add.mmLocationBySubLctNo}">
									<f:selectItem/>
									<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{mmLocationBean.all}" var="_item"/>
								</h:selectOneMenu>
								<h:message for="mmLocationSubBeanAddMmLocationBySubLctNo" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Sub Lct Descr"/>
							</f:facet>
							<h:link outcome="/mmLocationSub/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="itemSubLctDescr" value="#{_item.subLctDescr}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="mmLocationSubBeanAddSubLctDescr" maxLength="300" value="#{mmLocationSubBean.add.subLctDescr}"/>
								<h:message for="mmLocationSubBeanAddSubLctDescr" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column footerClass="remove-column" headerClass="remove-column">
							<h:commandLink action="#{_collection.remove(_item)}" styleClass="remove-button"/>
							<f:facet name="footer">
								<h:commandLink action="#{_collection.add(mmLocationSubBean.added)}" id="mmLocationBeanMmLocationMmLocationSubsForLctNoAdd" styleClass="add-button">
									<f:setPropertyActionListener target="#{mmLocationSubBean.add.mmLocationByLctNo}" value="#{mmLocationBean.mmLocation}"/>
								</h:commandLink>
							</f:facet>
						</h:column>
					</h:dataTable>
				</h:panelGroup>
				<h:outputText/>
			</h:panelGrid>

			<div class="buttons">
				<h:commandLink value="Save" action="#{mmLocationBean.update}" styleClass="btn btn-primary"/>
				<c:choose>
					<c:when test="#{!empty mmLocationBean.id}">
						<h:link value="Cancel" outcome="view" styleClass="btn btn-primary">
							<f:param name="id" value="#{mmLocationBean.id}"/>
						</h:link>
						<h:commandLink value="Delete" action="#{mmLocationBean.delete}" styleClass="btn btn-primary"/>
					</c:when>
					<c:otherwise>
						<h:link value="Cancel" outcome="search" styleClass="btn btn-primary"/>
					</c:otherwise>
				</c:choose>
			</div>
		</h:form>
	</ui:define>

</ui:composition>